package io.renren.modules.generator.export;

import io.renren.common.utils.excel.ExcelDataCreater;
import io.renren.modules.generator.entity.ProjectEntity;
import io.renren.modules.generator.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 齐丹枫
 * Date: 2018/12/26
 * Time: 9:48
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Component
public class ProjectExcelDataCreaterImpl extends ExcelDataCreater<ProjectEntity>{
    @Autowired
    private ProjectService projectService;

    @Override
    public List<ProjectEntity> queryDataForExcel(Map<String, Object> params) {
        return projectService.queryPage(params);
    }

    @Override
    public int queryTotalForExcel(Map<String, Object> params) {
        return projectService.queryPageTotal(params);
    }
}
